package com.ryx.server;

/**
 * Created by lenovo on 2016/10/25.
 */
public class BootChain {
    private final BootJob first = first();

    private BootJob first() {
        return new BootJob() {
            @Override
            public void start() {
                System.out.printf("begin start bootstrap chain...");
                startNext();
            }
        };
    }

    public BootJob boot() {
        return first;
    }

    public static BootChain chain() {
        return new BootChain();
    }
    public void start() {
        first.start();
    }
}
